home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / doc / sign.txt < prev    next >
Encoding:
Text File  |  2001-09-26  |  5.2 KB  |  167 lines

  1. *sign.txt*      For Vim version 6.0.  Last change: 2001 Sep 17
  2.  
  3.  
  4.           VIM REFERENCE MANUAL    by Gordon Prieur
  5.                       and Bram Moolenaar
  6.  
  7.  
  8. Sign Support Features                *sign-support*
  9.  
  10. 1. Introduction                |sign-intro|
  11. 2. Commands                |sign-commands|
  12.  
  13. {Vi does not have any of these features}
  14. {only available when compiled with the |+signs| feature}
  15.  
  16. ==============================================================================
  17. 1. Introduction                    *sign-intro*
  18.  
  19. When a debugger or other IPE tool is driving an editor it needs to be able
  20. to give specific highlights which quickly tell the user useful information
  21. about the file. One example of this would be a debugger which had an icon
  22. in the left-hand column denoting a breakpoint. Another example might be an
  23. arrow representing the Program Counter (PC). The sign features allow both
  24. placement of a sign, or icon, in the left-hand side of the window and
  25. definition of a highlight which will be applied to that line. Displaying the
  26. sign as an image is most likely only feasible in gvim (although Sun
  27. Microsystem's dtterm does support this its the only terminal emulator I know
  28. of which does).  A text sign and the highlight should be feasible in any color
  29. terminal emulator.
  30.  
  31. Signs and highlights are not useful just for debuggers. Sun's Visual
  32. WorkShop uses signs and highlights to mark build errors and SourceBrowser
  33. hits. Additionally, the debugger supports 8 to 10 different signs and
  34. highlight colors. |workshop|
  35.  
  36. There are two steps in using signs:
  37.  
  38. 1. Define the sign.  This specifies the image, text and highlighting.  For
  39.    example, you can define a "break" sign with an image of a stop roadsign and
  40.    text "!!".
  41.  
  42. 2. Place the sign.  This specifies the file and line number where the sign is
  43.    displayed.  A defined sign can be placed several times in different lines
  44.    and files.
  45.  
  46. When signs are defined for a file, Vim will automatically add a column of two
  47. characters to display them in.  When the last sign is unplaced the column
  48. disappears again.
  49.  
  50. ==============================================================================
  51. 2. Commands                    *sign-commands* *:sig* *:sign*
  52.  
  53. DEFINING A SIGN.                *:sign-define* *E255* *E160*
  54.  
  55. :sign define {name} {argument}...
  56.         Define a new sign or set attributes for an existing sign.
  57.         The {name} can either be a number (all digits) or a name
  58.         starting with a non-digit.
  59.         About 120 different signs can be defined.
  60.  
  61.         Accepted arguments:
  62.  
  63.     icon={pixmap}
  64.         Define the file name where the pixmap can be found.  The
  65.         pixmap should fit in the place of two characters.  This is not
  66.         checked.  If the pixmap is too big it will cause redraw
  67.         problems.
  68.  
  69.     linehl={group}
  70.         Highlighting group used for the whole line the sign is placed
  71.         in.  Most useful is defining a background color.
  72.  
  73.     text={text}                        *E239*
  74.         Define the text that is displayed when there is no icon or the
  75.         GUI is not being used.  Thus currently must be two ASCII
  76.         characters.
  77.  
  78.     texthl={group}
  79.         Highlighting group used for the text item.
  80.  
  81.  
  82. DELETING A SIGN                        *:sign-undefine* *E155*
  83.  
  84. :sign undefine {name}
  85.         Deletes a previously defined sign.  If signs with this {name}
  86.         are still placed this will cause trouble.
  87.  
  88.  
  89. LISTING SIGNS                        *:sign-list* *E156*
  90.  
  91. :sign list    Lists all defined signs and their attributes.
  92.  
  93. :sign list {name}
  94.         Lists one defined sign and its attributes.
  95.  
  96.  
  97. PLACING SIGNS                        *:sign-place* *E158*
  98.  
  99. :sign place {id} line={lnum} name={name} file={fname}
  100.         Place sign defined as {name} at line {lnum} in file {fname}.
  101.         The file {fname} must already be loaded in a buffer.  The
  102.         exact file name must be used, wildcards, $ENV and ~ are not
  103.         expanded.
  104.  
  105.         The sign is remembered under {id}, this can be used for
  106.         further manipulation.  {id} must be a number.
  107.         It's up to the user to make sure the {id} is used only once in
  108.         each file (if it's used several times unplacing will also have
  109.         to be done several times and making changes may not work as
  110.         expected).
  111.  
  112. :sign place {id} line={lnum} name={name} buffer={nr}
  113.         Same, but use buffer {nr}.
  114.  
  115. :sign place {id} name={name} file={fname}
  116.         Change the placed sign {id} in file {fname} to use the defined
  117.         sign {name}.  
  118.         This can be used to change the displayed sign without moving
  119.         it (e.g., when the debugger has stopped at a breakpoint).
  120.  
  121. :sign place {id} name={name} buffer={nr}
  122.         Same, but use buffer {nr}.
  123.  
  124.  
  125. REMOVING SIGNS                        *:sign-unplace* *E159*
  126.  
  127. :sign unplace {id} file={fname}
  128.         Remove the previously placed sign {id} from file {fname}.
  129.  
  130. :sign unplace {id} buffer={nr}
  131.         Same, but use buffer {nr}.
  132.  
  133. :sign unplace {id}
  134.         Remove the previously placed sign {id} from all files it
  135.         appears in.
  136.  
  137. :sign unplace *
  138.         Remove all placed signs.
  139.  
  140. :sign unplace
  141.         Remove the placed sign at the cursor position.
  142.  
  143.  
  144. LISTING PLACED SIGNS
  145.  
  146. :sign place file={fname}
  147.         List signs placed in file {fname}.
  148.  
  149. :sign place buffer={nr}
  150.         List signs placed in buffer {nr}.
  151.  
  152. :sign place    List placed signs in all files.
  153.  
  154.  
  155. JUMPING TO A SIGN                    *:sign-jump* *E157*
  156.  
  157. :sign jump {id} file={fname}
  158.         Open the file {fname} or jump to the window that contains
  159.         {fname} and position the cursor at sign {id}.
  160.         If the file isn't displayed in window and the current file can
  161.         not be |abandon|ed this fails.
  162.  
  163. :sign jump {id} buffer={nr}
  164.         Same, but use buffer {nr}.
  165.  
  166.  vim:tw=78:ts=8:ft=help:norl:
  167.